/*	变成制作三张彩票,然后把他们按顺序打印在屏幕上
 *
 */

#include<stdio.h>

int rand() {
	int i;
	i = i >= 0 ? i : 0 - i;
	return i;
}

int MakeTicket() {
	int a[7] = {0};
	for (int i = 0; i < 7; i++) {
		a[i] = rand() % 36 + 1;
		for ( int j = 0; j < i; j++) {
			if (a[j] == a[i]) {
				i--;
				break;
			}
		}
	}
	for (int i = 0; i < 7; i++) {
		printf("%d ", a[i]);
	}
}

int main () {
	printf("输入购买彩票数量:");
	int num = 0;
	scanf("%d", &num);
	for (int i = 0; i < num; i++) {
		printf("第%d张彩票:", i + 1);
		MakeTicket();
		printf("\n");
	}
	return 0;
}
